package com.wlyuan.index.domain.source.valueobj;

import com.wlyuan.core.marker.INamed;
import com.wlyuan.core.marker.NamedMap;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Map;

@AllArgsConstructor
@Getter
public enum Character implements INamed<Integer> {
    CUSTOMER(1, "发货方"),
    CARRIER(2, "承运方"),
    CONSIGNEE(3, "收货方");

    private final Integer value;
    private final String name;

    private static final Map<Integer, Character> MAP = new NamedMap<>(Character.values());

    public static Character valueOf(Integer value) {
        return MAP.get(value);
    }
}
